/*本文件定义页面跳转的逻辑*/
(function (){
    var AppRouter = Backbone.Router.extend({

        routes: {

            "homeShow" : "homeShow",//显示主页
            "activity" : "activity",//活动页预览
            "upLoadActivity" : "upLoadActivity",//上传活动
            "manageActivity" : "manageActivity",//管理活动
            "activity/activityShow" : "activityShow",//活动页预览
            //"activity/info": "activityInfo",//活动信息管理
            "activity/user": "activityUser",//报名用户管理

            "login": "login", //推广管理
            "signUp": "signUp" ,//推广管理
            "forgetPwd" :"forgetPwd",//忘记密码

            "personalHome" : "personalHome",//个人中心
            //"forgetPwd" :"forgetPwd",//
            "*actions" : "defaultRoute"


        },

        homeShow: function() {
            CK.load("html/homeShow");
        },

        activity: function() {
            CK.load("html/activityTable/activityTable");
        },

        upLoadActivity: function() {
            CK.load("html/upLoadActivity/header");
        },

        manageActivity: function() {
            CK.load("html/manageActivity/header");
        },
        activityInfo: function() {
            CK.load("html/activityTable/activityTable");
        },
        activityUser: function() {
            CK.load("html/activityTable/activityTable");
        },
        activityAd: function() {
            CK.load("html/activityTable/activityTable");
        },
        login: function() {
            var loginHTML = $("#loginHTML");
            if(loginHTML.length <= 0){
                CK.load("html/login/login",$("#otherHandler"));
                loginHTML = $("#loginHTML");
            }
            loginHTML.addClass("md-show");
        },
        signUp: function() {
            CK.load("html/login/header");
        },
        forgetPwd: function() {
            CK.load("html/login/forgetPwd");
        },

        personalHome: function() {
            CK.load("html/persionalHome/persionalHome")
        },

        defaultRoute : function(){
            CK.navigator();
        }

    });

    app_router  = new AppRouter;

    Backbone.history.start();
})();


